#{extends 'Admin.html'/}
#{set title:'Admin -> List Topic' /}

<h1>&{'admin.listTopic.title'}</h1>
<div class="adminTitleIntro">&{'admin.listTopic.title.intro'}</div>

<table>
    <thead>
        <tr>
            <th>Id</th>
            <th>Code</th>
            <th>Name</th>
            <th>Title</th>
            <th>Small Image</th>
            <th>Large Image</th>
            <th>#Related</th>
            <th>#MoreInfo</th>
            <th></th>
        </tr>
    </thead>
    <body>
        #{list items:topicDtos,as:'topicDto' }
            <tr>
                <td>
                    ${topicDto.topicId}
                </td>

                <td>
                    ${topicDto.code}
                </td>

                <td>
                    ${topicDto.name}
                </td>

                <td>
                    ${topicDto.title}
                </td>

                <td>
                    ${topicDto.relatedPhotoLength}
                </td>

                <td>
                    ${topicDto.largePhotoLength}
                </td>

                <td>
                    ${topicDto.relateds.size()}
                </td>

                <td>
                    ${topicDto.moreInfos.asList().size()}
                </td>

                <td nowrap="true" class="list_icons">
                    #{a @Admin.inputTopic(topicDto.topicId)}<img src="@{'/public/images/common/icons/edit_16.png'}" alt="">#{/a}

                    #{a @Admin.deleteTopic(topicDto.topicId)}
                        <img src="@{'/public/images/common/icons/delete_16.png'}" alt="">
                    #{/a}
                </td>
            </tr>
        #{/list}

    </body>

</table>

<br>

#{a @Admin.inputTopic()} Tạo Mới Chủ Đề #{/a}